package com.gxa.shop.service.account.impl;

import com.gxa.shop.bean.dto.AccountDto;
import com.gxa.shop.bean.pojo.Account;
import com.gxa.shop.bean.vo.AccountVo;
import com.gxa.shop.dao.account.AccountDao;
import com.gxa.shop.dao.account.impl.AccountDaoImpl;
import com.gxa.shop.service.account.AccountService;

import java.util.List;

public class AccountServiceImpl implements AccountService {
    AccountDao accountDao=new AccountDaoImpl();
    @Override
    public int deleteAccount(Integer id) {
        return accountDao.deleteAccount(id);
    }

    @Override
    public int updateAccount(Account account) {
        return accountDao.updateAccount(account);
    }

    @Override
    public int addAccount(Account account) {
        return accountDao.addAccount(account);
    }

    @Override
    public List<AccountVo> selectAccount(AccountDto accountDto) {
        return accountDao.selectAll(accountDto);
    }

    @Override
    public Long totalAccount(AccountDto accountDto) {
        return accountDao.totalAccount(accountDto);
    }
}
